var serviceDemand = "DemandServlet";
var serviceLogin = "LoginServlet";
var serviceFilters = "ViewFiltersServlet";

function ajaxSenderGET(request, service) {
	alert($.toJSON(request));
	alert(service);
	var dataResponse = "";
	$.ajax({
		url: service,
		async : false,
		processData : true,
		cache:false,
		contentType: "application/x-www-form-urlencoded",
		data : "jsonReq="+$.toJSON(request),
		type: "GET",
		
		success : function(data) {
			alert(data);
			dataResponse = data;
		}
	});
	return dataResponse;
}

function ajaxSenderPOST(request) {
	var dataResponse = "";
	$.ajax({
		url: service,
		processData : true,
		cache:false,
		contentType: "application/x-www-form-urlencoded",
		data : "jsonReq="+$.toJSON(request),
		type: "POST",
		
		success : function(data) {
			dataResponse = data;
		}
	});
	return dataResponse;
}